class ViewHtml:
    def __init__(self):
        self.document = ""
    
    def set_title(self, title):
        header=  "<b><h2>%s</h2></b>" % title
        self.document +=  header

    def addgroup(self, title, elements):
        group = "<table><tr><td><h3>%s</h3></td></tr>" % title
        line =  "<tr><td>%s:</td><td>&nbsp;&nbsp;</td><td>%s</td></tr>"
        for values in elements:
            group += line % (values[0], values[1])
        group += "</table><br>"
        self.document += group
